﻿/*
____
 L|ypps Web controls for ASP.NET

Copyright (c) 2009 Alessandro Zifiglio, http://www.Typps.com
EMail: alessandro@Typps.com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
namespace Typps
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    using System.Text;
    using System.Web;

    #region Delegates

    public delegate void TextSavingEventHandler(object sender, TextSavingEventArgs e);

    #endregion Delegates

    [DataContract]
    public class TextSavingEventArgs : EventArgs
    {
        #region Fields

        private string dataValue;

        #endregion Fields

        #region Constructors

        public TextSavingEventArgs(string data)
        {
            dataValue = data;
        }

        #endregion Constructors

        #region Properties

        public string Data
        {
            get { return dataValue; }
        }

        /// <summary>
        /// Setting this value allows you to retrieve it clientside in the "saved" event handler exposed by the editor via ClientSideSaved property where you
        /// pass the name of  your clientside function to listen to this event. This value is provided via the arguments parameter in the saved event handler.
        /// </summary>
        [DataMember(Name = "messageFromServer")]
        public string MessageToClient
        {
            get;
            set;
        }

        #endregion Properties
    }
}